import { FC } from 'react';
import { useRouteError } from 'react-router-dom';
import { ForbiddenException } from '@/service/http/errors/forbidden';

const PageBoundary: FC = () => {
  const error = useRouteError();

  if (error instanceof ForbiddenException) {
    return <div>对不起 您没有权限访问该页面</div>;
  }

  return <></>;
};

export default PageBoundary;
